package com.example.tamplate.model.vo;

import lombok.AllArgsConstructor;
import lombok.Data;

@Data
@AllArgsConstructor
public class Result<T> {

    public int code;
    public String msg;
    public T data;

    public static <t> Result<t> success(t data) {
       return new  Result<t>(200, "操作成功", data);
    }
    public static <t> Result<t> fail(t data) {
        return new Result<t>(500, "操作失败", data);
    }
}
